package com.xinchuang.service.image;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xinchuang.comment.R;
import com.xinchuang.entity.common.ImgTargetTable;
import com.xinchuang.entity.image.ImageCut;
import com.xinchuang.entity.image.ImageEditing;
import com.xinchuang.entity.image.TaskRun;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Map;

public interface GDALService {

    /**
     * 像素切图
     * @param tifFilePath
     * @param id
     */
    void tif2DB(String tifFilePath, String id);

    void cut(String id, String dbPath, BufferedImage image, int x1, int y1, int z1, int i1, int n, int x, int y) throws IOException;

    /**
     * 经纬度切图
     * @param id
     * @param type
     * @param imageEditing
     */
    void tif2DB2(String id, int type, ImageEditing imageEditing);

    Map<String,String> tifCutLonLat(String id, String fileUrl, int type);

    void tifCut(String redId, String tifFile, int type, String remark);

    ImageCut tif(String redId, String tifFile, int type, String remark);

//    void tifToImage(String id, String redId, String tifFile, String remark, int type);

    String tifPoints(TaskRun taskRun, JSONArray positionOne, JSONArray positionTwo);

    JSONObject autoDiscern(ImageCut cut, JSONArray array);

    boolean toWGS84(String sourceUrl, String targetUrl);

    ImageCut imageCut(String redId, String tifFile, int type, String remark);

}
